package com.xiaoma.service_hosp.controller;


import com.xiaoma.service_hosp.service.HospitalSetService;
import com.xiaoma.yygh.model.hosp.HospitalSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 医院设置表 前端控制器
 * </p>
 *
 * @author xiaoma
 * @since 2022-01-11
 */
@RestController
@RequestMapping("/admin/hosp/hospitalSet")
public class HospitalSetController {
    @Autowired
    private HospitalSetService service;
    //获取表中的所有信息
    @GetMapping("findAll")
    public List<HospitalSet> findAll(){
        List<HospitalSet> list =  service.list(null);
        return list;
    }

    @DeleteMapping("{id}")
    public Boolean deleteHosp(@PathVariable Long id){
        boolean b = service.removeById(id);
        return b;
    }
}

